package cn.cvs.service;

import cn.cvs.pojo.SysUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

public interface SysUserService {
    String hello();
    List<SysUser> findAll();

    //自定义条件查询
    List<SysUser> findByUsrNameAndUsrPassword(String usrName  , String usrPassword);
    Long countByUsrName(String usrName);
    List<SysUser>  findByUsrNameLike(String usrName);

    List<SysUser> findByRoleId(Long roleId);

    SysUser findByUsrId(@Param("usrId") Long usrId);

    int modifyNameById(String usrName,Long usrId);

    List<SysUser> findSysUsersByName(String usrName);

    Page<SysUser> findPageByUsrRoleId(Long roleId, Pageable pageable);
    Page<SysUser> findPageByMap(Map params, Pageable pageable);



}
